//C7:ep7_9.c: three strings, find the largeest.
#include <stdio.h>
#include <string.h>

int main(void)
{
    char string[20];
    char str[3][20];
    int i;
    
    puts("Enter three strings:");
    for(i = 0; i < 3; i++)
    {
        gets(str[i]);
    }
    
    if(strcmp(str[0],str[1]) > 0)
    {
        strcpy(string, str[0]);
    }
    else
    {
        strcpy(string, str[1]);
    }
    if(strcmp(str[2],string) > 0)
    {
        strcpy(string, str[2]);
    }
    
    printf("\n the largest string is:\n%s\n", string );
    return 0;
}